/**
 * Created by Dalyn on 2017/3/24.
 */
import Relay from "react-relay";

export default class RechargeMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { enterpriseApplyRecharge }`;
    }

    getVariables() {
        return {
            argsInput: {
                enid: this.props.enid,
                applyAmount: this.props.applyAmount,
                remitFileJson: this.props.remitFileJson,
                createByName: this.props.createByName,
                createBy: this.props.createBy
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on enterpriseApplyRechargePayload {
            data {
                errorCode
                value
                totalResult
                id  
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on enterpriseApplyRechargePayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id 
                    }
                }
            `]
        }];
    }

}
